package team.wuyou.controller;

import com.alibaba.fastjson.JSON;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import team.wuyou.bean.Result;
import team.wuyou.service.BoatService;
import team.wuyou.util.annotation.log.OperLog;
import team.wuyou.util.annotation.log.OperLogConst;

import java.util.Map;

@Controller
public class BoatController {


    @Autowired
    BoatService boatService;
    //ClientInfo
    //客户信息查询
    @RequestMapping("/boat")
    @ResponseBody
    @OperLog(operModul = OperLogConst.ORDER_MODULE,operType =OperLogConst.QUERY ,operDesc = "船只查询")
    public String SearchBoat(@RequestParam Map map) {
        System.out.println("进入controller，接收到的值为："+map);
        Result login = boatService.SearchBoat(map);
        return JSON.toJSONString(login);
    }
    @RequestMapping("/moreboat")
    @ResponseBody
    @OperLog(operModul = OperLogConst.ORDER_MODULE,operType =OperLogConst.QUERY ,operDesc = "船只查询")
    public String MoreBoat(@RequestParam Map map) {
        System.out.println("进入controller，接收到的值为："+map);
        Result login = boatService.MoreBoat(map);
        return JSON.toJSONString(login);
    }
}
